import {defineStore} from 'pinia'
import { getUserInfo } from '../common/js/api/user'

export const useUserStore = defineStore("useUserStore",{
	state:()=>{
		return {
			userInfo:{}
		}
	},
	actions:{
		getUserInfo(){
			getUserInfo().then(res=>{
				this.userInfo.nickname = res.data.nickname
				this.userInfo.gender = res.data.gender
			})
		}
	}
})